<?php
/**
 * Created by litong on Date: 2018/12/24 0024 上午 10:01
 */
class MyClass{
  public $public="public";
  protected $protected="protected";
  private $private="private";
  function printHello(){
    echo $this->public;
    echo $this->protected;
    echo $this->private;
  }
}
$obj=new MyClass();
echo $obj->public;
echo $obj->printHello();
?>